package com.ztgf.shopping.mapper.shop;

import com.ztgf.commodity.models.dto.CommodityComboRelationDTO;
import com.ztgf.commodity.models.dto.CommoditySpecificationRelationDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShopTipMapper {

    /**
     * @Description: 获取店铺商品规格属性库存不足数量
     * @Author: chenyu.wang
     * @Params: [shopId]
     * @Date: 2020.12.09 10:20
     */
    Integer getShopSalesNum(@Param("shopId") Long shopId);

    /**
     * @Description: 获取店铺商品套餐库存不足数量
     * @Author: chenyu.wang
     * @Params: [shopId]
     * @Date: 2020.12.09 10:22
     */
    Integer getShopMealNum(@Param("shopId") Long shopId);

    /**
     * @Description: 获取买家各种状态订单数量
     * @Author: chenyu.wang
     * @Params: [shopId, orderState]
     * @Date: 2020.12.09 11:12
     */
    Integer getBuyerOrderStateNum(@Param("shopId") Long shopId, @Param("orderState") Integer orderState,@Param("inquiryType")Integer inquiryType);

    /**
     * @Description: 获取卖家各种状态订单数量
     * @Author: chenyu.wang
     * @Params: [shopId, orderState]
     * @Date: 2020.12.09 11:12
     */
    Integer getSellOrderStateNum(@Param("shopId") Long shopId, @Param("orderState") Integer orderState,@Param("inquiryType")Integer inquiryType);

    /**
     * @Description: 获取买家废弃合同数量
     * @Author: chenyu.wang
     * @Params: [shopId]
     * @Date: 2020.12.09 14:33
     */
    Integer getBuyerContractNum(@Param("shopId") Long shopId);

    /**
     * @Description: 获取卖家废弃合同数量
     * @Author: chenyu.wang
     * @Params: [shopId]
     * @Date: 2020.12.09 14:33
     */
    Integer getSellContractNum(@Param("shopId") Long shopId);

    /**
     * @Description: 获取用户发票数量
     * @Author: chenyu.wang
     * @Params: [type：1买家，2卖家, flag:1已开，2未开, shopId]
     * @Date: 2020.12.09 15:02
     */
    Integer getUserInvoiceNum(@Param("type") Integer type, @Param("flag") Integer flag, @Param("shopId") Long shopId);

    /**
     * @Description: 获取商品规格库存不足列表
     * @Author: chenyu.wang
     * @Params: [goodsId]
     * @Date: 2020.12.10 11:45
     */
    List<CommoditySpecificationRelationDTO> queryGoodsSkuList(@Param("goodsId") Long goodsId);

    /**
     * @Description: 获取商品套餐库存不足列表
     * @Author: chenyu.wang
     * @Params: [goodsId]
     * @Date: 2020.12.10 11:48
     */
    List<CommodityComboRelationDTO> queryGoodsComboList(@Param("goodsId") Long goodsId);

    List<Long> queryOrderLook(@Param("flag") Integer flag, @Param("shopId") Long shopId);

    List<Long> queryInvoiceLook(@Param("flag") Integer flag, @Param("shopId") Long shopId);

    List<Long> queryContactLook(@Param("flag") Integer flag, @Param("shopId") Long shopId);

    /**
     * @return : java.lang.Integer
     * @Author :chenyu.wang
     * @Description : 获取买家待付款数量
     * @Date : 2021.03.23 17:09
     * @Param : [shopId]
     **/
    Integer getTheBuyerSPendingPaymentQuantity(@Param("shopId") Long shopId,@Param("inquiryType")Integer inquiryType);

    /**
     * @return : java.lang.Integer
     * @Author :chenyu.wang
     * @Description : 获取卖家待付款数量
     * @Date : 2021.03.23 17:11
     * @Param : [shopId]
     **/
    Integer getTheSellerSPendingPaymentQuantity(@Param("shopId") Long shopId,@Param("inquiryType")Integer inquiryType);

}
